import React from 'react'
import { NavBar, Icon } from 'antd-mobile'

import 'font-awesome/less/font-awesome.less'
import 'react-fontawesome'
import '../assets/css/NavBar.css'

class Navbar extends React.Component {
  // constructor(props) {
  //   super(props)
  //   // console.log(this.props)
  // }
  render() {
    // console.log(this.props)
    return (
      <div className="navbar_content">
        <NavBar
          mode="light"
          icon={<Icon type="left" />}
          onLeftClick={this.leftClick}
          rightContent={[
            <Icon key="0" type="search" style={{ marginRight: '16px' }} />,
            <Icon key="1" type="ellipsis" />,
            // <i key="0" class="fa fa-camera-retro"></i>,
          ]}
        >
          {this.props.name}
        </NavBar>
      </div>
    )
  }
  leftClick = () => {
    this.props.params.history.go(-1)
  }
}

export default Navbar
